<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Priithon.py.buffer</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="Priithon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/priithon">Priithon</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="Priithon-module.html">Package&nbsp;Priithon</a> ::
        <a href="Priithon.py-module.html">Package&nbsp;py</a> ::
        Module&nbsp;buffer
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="Priithon.py.buffer-pysrc.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<h1 class="epydoc">Source Code for <a href="Priithon.py.buffer-module.html">Module Priithon.py.buffer</a></h1>
<pre class="py-src">
<a name="L1"></a><tt class="py-lineno">  1</tt>  <tt class="py-line"><tt class="py-docstring">"""Buffer class."""</tt> </tt>
<a name="L2"></a><tt class="py-lineno">  2</tt>  <tt class="py-line"> </tt>
<a name="L3"></a><tt class="py-lineno">  3</tt>  <tt class="py-line"><tt class="py-name">__author__</tt> <tt class="py-op">=</tt> <tt class="py-string">"Patrick K. O'Brien &lt;pobrien@orbtech.com&gt;"</tt> </tt>
<a name="L4"></a><tt class="py-lineno">  4</tt>  <tt class="py-line"><tt id="link-0" class="py-name" targets="Variable Priithon.py.PyAlaCarte.__cvsid__=Priithon.py.PyAlaCarte-module.html#__cvsid__,Variable Priithon.py.PyAlaMode.__cvsid__=Priithon.py.PyAlaMode-module.html#__cvsid__,Variable Priithon.py.PyAlaModeTest.__cvsid__=Priithon.py.PyAlaModeTest-module.html#__cvsid__,Variable Priithon.py.PyCrust.__cvsid__=Priithon.py.PyCrust-module.html#__cvsid__,Variable Priithon.py.PyFilling.__cvsid__=Priithon.py.PyFilling-module.html#__cvsid__,Variable Priithon.py.PyShell.__cvsid__=Priithon.py.PyShell-module.html#__cvsid__,Variable Priithon.py.PyWrap.__cvsid__=Priithon.py.PyWrap-module.html#__cvsid__,Variable Priithon.py.__cvsid__=Priithon.py-module.html#__cvsid__,Variable Priithon.py.buffer.__cvsid__=Priithon.py.buffer-module.html#__cvsid__,Variable Priithon.py.crust.__cvsid__=Priithon.py.crust-module.html#__cvsid__,Variable Priithon.py.dispatcher.__cvsid__=Priithon.py.dispatcher-module.html#__cvsid__,Variable Priithon.py.document.__cvsid__=Priithon.py.document-module.html#__cvsid__,Variable Priithon.py.editor.__cvsid__=Priithon.py.editor-module.html#__cvsid__,Variable Priithon.py.editwindow.__cvsid__=Priithon.py.editwindow-module.html#__cvsid__,Variable Priithon.py.filling.__cvsid__=Priithon.py.filling-module.html#__cvsid__,Variable Priithon.py.frame.__cvsid__=Priithon.py.frame-module.html#__cvsid__,Variable Priithon.py.images.__cvsid__=Priithon.py.images-module.html#__cvsid__,Variable Priithon.py.interpreter.__cvsid__=Priithon.py.interpreter-module.html#__cvsid__,Variable Priithon.py.introspect.__cvsid__=Priithon.py.introspect-module.html#__cvsid__,Variable Priithon.py.pseudo.__cvsid__=Priithon.py.pseudo-module.html#__cvsid__,Variable Priithon.py.shell.__cvsid__=Priithon.py.shell-module.html#__cvsid__,Variable Priithon.py.version.__cvsid__=Priithon.py.version-module.html#__cvsid__"><a title="Priithon.py.PyAlaCarte.__cvsid__
Priithon.py.PyAlaMode.__cvsid__
Priithon.py.PyAlaModeTest.__cvsid__
Priithon.py.PyCrust.__cvsid__
Priithon.py.PyFilling.__cvsid__
Priithon.py.PyShell.__cvsid__
Priithon.py.PyWrap.__cvsid__
Priithon.py.__cvsid__
Priithon.py.buffer.__cvsid__
Priithon.py.crust.__cvsid__
Priithon.py.dispatcher.__cvsid__
Priithon.py.document.__cvsid__
Priithon.py.editor.__cvsid__
Priithon.py.editwindow.__cvsid__
Priithon.py.filling.__cvsid__
Priithon.py.frame.__cvsid__
Priithon.py.images.__cvsid__
Priithon.py.interpreter.__cvsid__
Priithon.py.introspect.__cvsid__
Priithon.py.pseudo.__cvsid__
Priithon.py.shell.__cvsid__
Priithon.py.version.__cvsid__" class="py-name" href="#" onclick="return doclink('link-0', '__cvsid__', 'link-0');">__cvsid__</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"$Id: buffer.py,v 1.5 2004/02/13 02:47:58 PKO Exp $"</tt> </tt>
<a name="L5"></a><tt class="py-lineno">  5</tt>  <tt class="py-line"><tt id="link-1" class="py-name" targets="Variable Priithon.py.PyAlaCarte.__revision__=Priithon.py.PyAlaCarte-module.html#__revision__,Variable Priithon.py.PyAlaMode.__revision__=Priithon.py.PyAlaMode-module.html#__revision__,Variable Priithon.py.PyAlaModeTest.__revision__=Priithon.py.PyAlaModeTest-module.html#__revision__,Variable Priithon.py.PyCrust.__revision__=Priithon.py.PyCrust-module.html#__revision__,Variable Priithon.py.PyFilling.__revision__=Priithon.py.PyFilling-module.html#__revision__,Variable Priithon.py.PyShell.__revision__=Priithon.py.PyShell-module.html#__revision__,Variable Priithon.py.PyWrap.__revision__=Priithon.py.PyWrap-module.html#__revision__,Variable Priithon.py.__revision__=Priithon.py-module.html#__revision__,Variable Priithon.py.buffer.__revision__=Priithon.py.buffer-module.html#__revision__,Variable Priithon.py.crust.__revision__=Priithon.py.crust-module.html#__revision__,Variable Priithon.py.dispatcher.__revision__=Priithon.py.dispatcher-module.html#__revision__,Variable Priithon.py.document.__revision__=Priithon.py.document-module.html#__revision__,Variable Priithon.py.editor.__revision__=Priithon.py.editor-module.html#__revision__,Variable Priithon.py.editwindow.__revision__=Priithon.py.editwindow-module.html#__revision__,Variable Priithon.py.filling.__revision__=Priithon.py.filling-module.html#__revision__,Variable Priithon.py.frame.__revision__=Priithon.py.frame-module.html#__revision__,Variable Priithon.py.images.__revision__=Priithon.py.images-module.html#__revision__,Variable Priithon.py.interpreter.__revision__=Priithon.py.interpreter-module.html#__revision__,Variable Priithon.py.introspect.__revision__=Priithon.py.introspect-module.html#__revision__,Variable Priithon.py.pseudo.__revision__=Priithon.py.pseudo-module.html#__revision__,Variable Priithon.py.shell.__revision__=Priithon.py.shell-module.html#__revision__,Variable Priithon.py.version.__revision__=Priithon.py.version-module.html#__revision__"><a title="Priithon.py.PyAlaCarte.__revision__
Priithon.py.PyAlaMode.__revision__
Priithon.py.PyAlaModeTest.__revision__
Priithon.py.PyCrust.__revision__
Priithon.py.PyFilling.__revision__
Priithon.py.PyShell.__revision__
Priithon.py.PyWrap.__revision__
Priithon.py.__revision__
Priithon.py.buffer.__revision__
Priithon.py.crust.__revision__
Priithon.py.dispatcher.__revision__
Priithon.py.document.__revision__
Priithon.py.editor.__revision__
Priithon.py.editwindow.__revision__
Priithon.py.filling.__revision__
Priithon.py.frame.__revision__
Priithon.py.images.__revision__
Priithon.py.interpreter.__revision__
Priithon.py.introspect.__revision__
Priithon.py.pseudo.__revision__
Priithon.py.shell.__revision__
Priithon.py.version.__revision__" class="py-name" href="#" onclick="return doclink('link-1', '__revision__', 'link-1');">__revision__</a></tt> <tt class="py-op">=</tt> <tt class="py-string">"$Revision: 1.5 $"</tt><tt class="py-op">[</tt><tt class="py-number">11</tt><tt class="py-op">:</tt><tt class="py-op">-</tt><tt class="py-number">2</tt><tt class="py-op">]</tt> </tt>
<a name="L6"></a><tt class="py-lineno">  6</tt>  <tt class="py-line"> </tt>
<a name="L7"></a><tt class="py-lineno">  7</tt>  <tt class="py-line"><tt class="py-keyword">from</tt> <tt id="link-2" class="py-name" targets="Module Priithon.py.interpreter=Priithon.py.interpreter-module.html"><a title="Priithon.py.interpreter" class="py-name" href="#" onclick="return doclink('link-2', 'interpreter', 'link-2');">interpreter</a></tt> <tt class="py-keyword">import</tt> <tt id="link-3" class="py-name" targets="Class Priithon.py.interpreter.Interpreter=Priithon.py.interpreter.Interpreter-class.html"><a title="Priithon.py.interpreter.Interpreter" class="py-name" href="#" onclick="return doclink('link-3', 'Interpreter', 'link-3');">Interpreter</a></tt> </tt>
<a name="L8"></a><tt class="py-lineno">  8</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">imp</tt> </tt>
<a name="L9"></a><tt class="py-lineno">  9</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">os</tt> </tt>
<a name="L10"></a><tt class="py-lineno"> 10</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt class="py-name">sys</tt> </tt>
<a name="L11"></a><tt class="py-lineno"> 11</tt>  <tt class="py-line"> </tt>
<a name="L12"></a><tt class="py-lineno"> 12</tt>  <tt class="py-line"><tt class="py-keyword">import</tt> <tt id="link-4" class="py-name" targets="Module Priithon.py.document=Priithon.py.document-module.html"><a title="Priithon.py.document" class="py-name" href="#" onclick="return doclink('link-4', 'document', 'link-4');">document</a></tt> </tt>
<a name="L13"></a><tt class="py-lineno"> 13</tt>  <tt class="py-line"> </tt>
<a name="L14"></a><tt class="py-lineno"> 14</tt>  <tt class="py-line"> </tt>
<a name="Buffer"></a><div id="Buffer-def"><a name="L15"></a><tt class="py-lineno"> 15</tt> <a class="py-toggle" href="#" id="Buffer-toggle" onclick="return toggle('Buffer');">-</a><tt class="py-line"><tt class="py-keyword">class</tt> <a class="py-def-name" href="Priithon.py.buffer.Buffer-class.html">Buffer</a><tt class="py-op">:</tt> </tt>
</div><div id="Buffer-collapsed" style="display:none;" pad="+++" indent="++++"></div><div id="Buffer-expanded"><a name="L16"></a><tt class="py-lineno"> 16</tt>  <tt class="py-line">    <tt class="py-docstring">"""Buffer class."""</tt> </tt>
<a name="L17"></a><tt class="py-lineno"> 17</tt>  <tt class="py-line"> </tt>
<a name="L18"></a><tt class="py-lineno"> 18</tt>  <tt class="py-line">    <tt id="link-5" class="py-name" targets="Variable Priithon.py.buffer.Buffer.id=Priithon.py.buffer.Buffer-class.html#id"><a title="Priithon.py.buffer.Buffer.id" class="py-name" href="#" onclick="return doclink('link-5', 'id', 'link-5');">id</a></tt> <tt class="py-op">=</tt> <tt class="py-number">0</tt> </tt>
<a name="L19"></a><tt class="py-lineno"> 19</tt>  <tt class="py-line"> </tt>
<a name="Buffer.__init__"></a><div id="Buffer.__init__-def"><a name="L20"></a><tt class="py-lineno"> 20</tt> <a class="py-toggle" href="#" id="Buffer.__init__-toggle" onclick="return toggle('Buffer.__init__');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="Priithon.py.buffer.Buffer-class.html#__init__">__init__</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">filename</tt><tt class="py-op">=</tt><tt class="py-name">None</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Buffer.__init__-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Buffer.__init__-expanded"><a name="L21"></a><tt class="py-lineno"> 21</tt>  <tt class="py-line">        <tt class="py-docstring">"""Create a Buffer instance."""</tt> </tt>
<a name="L22"></a><tt class="py-lineno"> 22</tt>  <tt class="py-line">        <tt id="link-6" class="py-name" targets="Class Priithon.py.buffer.Buffer=Priithon.py.buffer.Buffer-class.html"><a title="Priithon.py.buffer.Buffer" class="py-name" href="#" onclick="return doclink('link-6', 'Buffer', 'link-6');">Buffer</a></tt><tt class="py-op">.</tt><tt id="link-7" class="py-name"><a title="Priithon.py.buffer.Buffer.id" class="py-name" href="#" onclick="return doclink('link-7', 'id', 'link-5');">id</a></tt> <tt class="py-op">+=</tt> <tt class="py-number">1</tt> </tt>
<a name="L23"></a><tt class="py-lineno"> 23</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-8" class="py-name"><a title="Priithon.py.buffer.Buffer.id" class="py-name" href="#" onclick="return doclink('link-8', 'id', 'link-5');">id</a></tt> <tt class="py-op">=</tt> <tt id="link-9" class="py-name"><a title="Priithon.py.buffer.Buffer" class="py-name" href="#" onclick="return doclink('link-9', 'Buffer', 'link-6');">Buffer</a></tt><tt class="py-op">.</tt><tt id="link-10" class="py-name"><a title="Priithon.py.buffer.Buffer.id" class="py-name" href="#" onclick="return doclink('link-10', 'id', 'link-5');">id</a></tt> </tt>
<a name="L24"></a><tt class="py-lineno"> 24</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">interp</tt> <tt class="py-op">=</tt> <tt id="link-11" class="py-name"><a title="Priithon.py.interpreter.Interpreter" class="py-name" href="#" onclick="return doclink('link-11', 'Interpreter', 'link-3');">Interpreter</a></tt><tt class="py-op">(</tt><tt class="py-name">locals</tt><tt class="py-op">=</tt><tt class="py-op">{</tt><tt class="py-op">}</tt><tt class="py-op">)</tt> </tt>
<a name="L25"></a><tt class="py-lineno"> 25</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-12" class="py-name" targets="Variable Priithon.py.crust.Crust.name=Priithon.py.crust.Crust-class.html#name,Variable Priithon.py.crust.CrustFrame.name=Priithon.py.crust.CrustFrame-class.html#name,Variable Priithon.py.filling.Filling.name=Priithon.py.filling.Filling-class.html#name,Variable Priithon.py.filling.FillingFrame.name=Priithon.py.filling.FillingFrame-class.html#name,Variable Priithon.py.filling.FillingText.name=Priithon.py.filling.FillingText-class.html#name,Variable Priithon.py.filling.FillingTree.name=Priithon.py.filling.FillingTree-class.html#name,Variable Priithon.py.shell.Shell.name=Priithon.py.shell.Shell-class.html#name,Variable Priithon.py.shell.ShellFacade.name=Priithon.py.shell.ShellFacade-class.html#name,Variable Priithon.py.shell.ShellFrame.name=Priithon.py.shell.ShellFrame-class.html#name"><a title="Priithon.py.crust.Crust.name
Priithon.py.crust.CrustFrame.name
Priithon.py.filling.Filling.name
Priithon.py.filling.FillingFrame.name
Priithon.py.filling.FillingText.name
Priithon.py.filling.FillingTree.name
Priithon.py.shell.Shell.name
Priithon.py.shell.ShellFacade.name
Priithon.py.shell.ShellFrame.name" class="py-name" href="#" onclick="return doclink('link-12', 'name', 'link-12');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-string">''</tt> </tt>
<a name="L26"></a><tt class="py-lineno"> 26</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">editors</tt> <tt class="py-op">=</tt> <tt class="py-op">{</tt><tt class="py-op">}</tt> </tt>
<a name="L27"></a><tt class="py-lineno"> 27</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-13" class="py-name" targets="Module Priithon.py.editor=Priithon.py.editor-module.html,Function Priithon.usefulX.editor()=Priithon.usefulX-module.html#editor"><a title="Priithon.py.editor
Priithon.usefulX.editor" class="py-name" href="#" onclick="return doclink('link-13', 'editor', 'link-13');">editor</a></tt> <tt class="py-op">=</tt> <tt class="py-name">None</tt> </tt>
<a name="L28"></a><tt class="py-lineno"> 28</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">modules</tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">modules</tt><tt class="py-op">.</tt><tt id="link-14" class="py-name" targets="Method Priithon.plt.dumbdbm_patched._Database.keys()=Priithon.plt.dumbdbm_patched._Database-class.html#keys"><a title="Priithon.plt.dumbdbm_patched._Database.keys" class="py-name" href="#" onclick="return doclink('link-14', 'keys', 'link-14');">keys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L29"></a><tt class="py-lineno"> 29</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">syspath</tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">[</tt><tt class="py-op">:</tt><tt class="py-op">]</tt> </tt>
<a name="L30"></a><tt class="py-lineno"> 30</tt>  <tt class="py-line">        <tt class="py-keyword">while</tt> <tt id="link-15" class="py-name" targets="Variable Priithon.wxPyPlot.True=Priithon.wxPyPlot-module.html#True"><a title="Priithon.wxPyPlot.True" class="py-name" href="#" onclick="return doclink('link-15', 'True', 'link-15');">True</a></tt><tt class="py-op">:</tt> </tt>
<a name="L31"></a><tt class="py-lineno"> 31</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L32"></a><tt class="py-lineno"> 32</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">syspath</tt><tt class="py-op">.</tt><tt class="py-name">remove</tt><tt class="py-op">(</tt><tt class="py-string">''</tt><tt class="py-op">)</tt> </tt>
<a name="L33"></a><tt class="py-lineno"> 33</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
<a name="L34"></a><tt class="py-lineno"> 34</tt>  <tt class="py-line">                <tt class="py-keyword">break</tt> </tt>
<a name="L35"></a><tt class="py-lineno"> 35</tt>  <tt class="py-line">        <tt class="py-keyword">while</tt> <tt id="link-16" class="py-name"><a title="Priithon.wxPyPlot.True" class="py-name" href="#" onclick="return doclink('link-16', 'True', 'link-15');">True</a></tt><tt class="py-op">:</tt> </tt>
<a name="L36"></a><tt class="py-lineno"> 36</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L37"></a><tt class="py-lineno"> 37</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">syspath</tt><tt class="py-op">.</tt><tt class="py-name">remove</tt><tt class="py-op">(</tt><tt class="py-string">'.'</tt><tt class="py-op">)</tt> </tt>
<a name="L38"></a><tt class="py-lineno"> 38</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt> <tt class="py-name">ValueError</tt><tt class="py-op">:</tt> </tt>
<a name="L39"></a><tt class="py-lineno"> 39</tt>  <tt class="py-line">                <tt class="py-keyword">break</tt> </tt>
<a name="L40"></a><tt class="py-lineno"> 40</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-17" class="py-name" targets="Function Priithon.Mrc.open()=Priithon.Mrc-module.html#open,Function Priithon.plt.dumb_shelve.open()=Priithon.plt.dumb_shelve-module.html#open,Function Priithon.plt.dumbdbm_patched.open()=Priithon.plt.dumbdbm_patched-module.html#open,Method Priithon.py.buffer.Buffer.open()=Priithon.py.buffer.Buffer-class.html#open"><a title="Priithon.Mrc.open
Priithon.plt.dumb_shelve.open
Priithon.plt.dumbdbm_patched.open
Priithon.py.buffer.Buffer.open" class="py-name" href="#" onclick="return doclink('link-17', 'open', 'link-17');">open</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
</div><a name="L41"></a><tt class="py-lineno"> 41</tt>  <tt class="py-line"> </tt>
<a name="Buffer.addEditor"></a><div id="Buffer.addEditor-def"><a name="L42"></a><tt class="py-lineno"> 42</tt> <a class="py-toggle" href="#" id="Buffer.addEditor-toggle" onclick="return toggle('Buffer.addEditor');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="Priithon.py.buffer.Buffer-class.html#addEditor">addEditor</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">editor</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Buffer.addEditor-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Buffer.addEditor-expanded"><a name="L43"></a><tt class="py-lineno"> 43</tt>  <tt class="py-line">        <tt class="py-docstring">"""Add an editor."""</tt> </tt>
<a name="L44"></a><tt class="py-lineno"> 44</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-18" class="py-name"><a title="Priithon.py.editor
Priithon.usefulX.editor" class="py-name" href="#" onclick="return doclink('link-18', 'editor', 'link-13');">editor</a></tt> <tt class="py-op">=</tt> <tt id="link-19" class="py-name"><a title="Priithon.py.editor
Priithon.usefulX.editor" class="py-name" href="#" onclick="return doclink('link-19', 'editor', 'link-13');">editor</a></tt> </tt>
<a name="L45"></a><tt class="py-lineno"> 45</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">editors</tt><tt class="py-op">[</tt><tt id="link-20" class="py-name"><a title="Priithon.py.editor
Priithon.usefulX.editor" class="py-name" href="#" onclick="return doclink('link-20', 'editor', 'link-13');">editor</a></tt><tt class="py-op">.</tt><tt id="link-21" class="py-name"><a title="Priithon.py.buffer.Buffer.id" class="py-name" href="#" onclick="return doclink('link-21', 'id', 'link-5');">id</a></tt><tt class="py-op">]</tt> <tt class="py-op">=</tt> <tt id="link-22" class="py-name"><a title="Priithon.py.editor
Priithon.usefulX.editor" class="py-name" href="#" onclick="return doclink('link-22', 'editor', 'link-13');">editor</a></tt> </tt>
</div><a name="L46"></a><tt class="py-lineno"> 46</tt>  <tt class="py-line"> </tt>
<a name="Buffer.hasChanged"></a><div id="Buffer.hasChanged-def"><a name="L47"></a><tt class="py-lineno"> 47</tt> <a class="py-toggle" href="#" id="Buffer.hasChanged-toggle" onclick="return toggle('Buffer.hasChanged');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="Priithon.py.buffer.Buffer-class.html#hasChanged">hasChanged</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Buffer.hasChanged-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Buffer.hasChanged-expanded"><a name="L48"></a><tt class="py-lineno"> 48</tt>  <tt class="py-line">        <tt class="py-docstring">"""Return True if text in editor has changed since last save."""</tt> </tt>
<a name="L49"></a><tt class="py-lineno"> 49</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-23" class="py-name"><a title="Priithon.py.editor
Priithon.usefulX.editor" class="py-name" href="#" onclick="return doclink('link-23', 'editor', 'link-13');">editor</a></tt><tt class="py-op">:</tt> </tt>
<a name="L50"></a><tt class="py-lineno"> 50</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-24" class="py-name"><a title="Priithon.py.editor
Priithon.usefulX.editor" class="py-name" href="#" onclick="return doclink('link-24', 'editor', 'link-13');">editor</a></tt><tt class="py-op">.</tt><tt id="link-25" class="py-name" targets="Method Priithon.py.buffer.Buffer.hasChanged()=Priithon.py.buffer.Buffer-class.html#hasChanged,Method Priithon.py.editor.Editor.hasChanged()=Priithon.py.editor.Editor-class.html#hasChanged"><a title="Priithon.py.buffer.Buffer.hasChanged
Priithon.py.editor.Editor.hasChanged" class="py-name" href="#" onclick="return doclink('link-25', 'hasChanged', 'link-25');">hasChanged</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L51"></a><tt class="py-lineno"> 51</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L52"></a><tt class="py-lineno"> 52</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-26" class="py-name" targets="Variable Priithon.wxPyPlot.False=Priithon.wxPyPlot-module.html#False"><a title="Priithon.wxPyPlot.False" class="py-name" href="#" onclick="return doclink('link-26', 'False', 'link-26');">False</a></tt> </tt>
</div><a name="L53"></a><tt class="py-lineno"> 53</tt>  <tt class="py-line"> </tt>
<a name="Buffer.new"></a><div id="Buffer.new-def"><a name="L54"></a><tt class="py-lineno"> 54</tt> <a class="py-toggle" href="#" id="Buffer.new-toggle" onclick="return toggle('Buffer.new');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="Priithon.py.buffer.Buffer-class.html#new">new</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">filepath</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Buffer.new-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Buffer.new-expanded"><a name="L55"></a><tt class="py-lineno"> 55</tt>  <tt class="py-line">        <tt class="py-docstring">"""New empty buffer."""</tt> </tt>
<a name="L56"></a><tt class="py-lineno"> 56</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">filepath</tt><tt class="py-op">:</tt> </tt>
<a name="L57"></a><tt class="py-lineno"> 57</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> </tt>
<a name="L58"></a><tt class="py-lineno"> 58</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">exists</tt><tt class="py-op">(</tt><tt class="py-name">filepath</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L59"></a><tt class="py-lineno"> 59</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">confirmed</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-27" class="py-name" targets="Method Priithon.py.buffer.Buffer.overwriteConfirm()=Priithon.py.buffer.Buffer-class.html#overwriteConfirm"><a title="Priithon.py.buffer.Buffer.overwriteConfirm" class="py-name" href="#" onclick="return doclink('link-27', 'overwriteConfirm', 'link-27');">overwriteConfirm</a></tt><tt class="py-op">(</tt><tt class="py-name">filepath</tt><tt class="py-op">)</tt> </tt>
<a name="L60"></a><tt class="py-lineno"> 60</tt>  <tt class="py-line">        <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L61"></a><tt class="py-lineno"> 61</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">confirmed</tt> <tt class="py-op">=</tt> <tt id="link-28" class="py-name"><a title="Priithon.wxPyPlot.True" class="py-name" href="#" onclick="return doclink('link-28', 'True', 'link-15');">True</a></tt> </tt>
</div><a name="L62"></a><tt class="py-lineno"> 62</tt>  <tt class="py-line"> </tt>
<a name="Buffer.open"></a><div id="Buffer.open-def"><a name="L63"></a><tt class="py-lineno"> 63</tt> <a class="py-toggle" href="#" id="Buffer.open-toggle" onclick="return toggle('Buffer.open');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="Priithon.py.buffer.Buffer-class.html#open">open</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">filename</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Buffer.open-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Buffer.open-expanded"><a name="L64"></a><tt class="py-lineno"> 64</tt>  <tt class="py-line">        <tt class="py-docstring">"""Open file into buffer."""</tt> </tt>
<a name="L65"></a><tt class="py-lineno"> 65</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">doc</tt> <tt class="py-op">=</tt> <tt id="link-29" class="py-name"><a title="Priithon.py.document" class="py-name" href="#" onclick="return doclink('link-29', 'document', 'link-4');">document</a></tt><tt class="py-op">.</tt><tt id="link-30" class="py-name" targets="Class Priithon.py.document.Document=Priithon.py.document.Document-class.html"><a title="Priithon.py.document.Document" class="py-name" href="#" onclick="return doclink('link-30', 'Document', 'link-30');">Document</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L66"></a><tt class="py-lineno"> 66</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-31" class="py-name"><a title="Priithon.py.crust.Crust.name
Priithon.py.crust.CrustFrame.name
Priithon.py.filling.Filling.name
Priithon.py.filling.FillingFrame.name
Priithon.py.filling.FillingText.name
Priithon.py.filling.FillingTree.name
Priithon.py.shell.Shell.name
Priithon.py.shell.ShellFacade.name
Priithon.py.shell.ShellFrame.name" class="py-name" href="#" onclick="return doclink('link-31', 'name', 'link-12');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">doc</tt><tt class="py-op">.</tt><tt class="py-name">filename</tt> <tt class="py-keyword">or</tt> <tt class="py-op">(</tt><tt class="py-string">'Untitled:'</tt> <tt class="py-op">+</tt> <tt class="py-name">str</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-32" class="py-name"><a title="Priithon.py.buffer.Buffer.id" class="py-name" href="#" onclick="return doclink('link-32', 'id', 'link-5');">id</a></tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L67"></a><tt class="py-lineno"> 67</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">modulename</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">doc</tt><tt class="py-op">.</tt><tt class="py-name">filebase</tt> </tt>
<a name="L68"></a><tt class="py-lineno"> 68</tt>  <tt class="py-line">        <tt class="py-comment"># XXX This should really make sure filedir is first item in syspath.</tt> </tt>
<a name="L69"></a><tt class="py-lineno"> 69</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-comment"># XXX Or maybe this should be moved to the update namespace method.</tt> </tt>
<a name="L70"></a><tt class="py-lineno"> 70</tt>  <tt class="py-line"><tt class="py-comment"></tt>        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">doc</tt><tt class="py-op">.</tt><tt class="py-name">filedir</tt> <tt class="py-keyword">and</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">doc</tt><tt class="py-op">.</tt><tt class="py-name">filedir</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">syspath</tt><tt class="py-op">:</tt> </tt>
<a name="L71"></a><tt class="py-lineno"> 71</tt>  <tt class="py-line">            <tt class="py-comment"># To create the proper context for updateNamespace.</tt> </tt>
<a name="L72"></a><tt class="py-lineno"> 72</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">syspath</tt><tt class="py-op">.</tt><tt id="link-33" class="py-name" targets="Function Priithon.useful.insert()=Priithon.useful-module.html#insert"><a title="Priithon.useful.insert" class="py-name" href="#" onclick="return doclink('link-33', 'insert', 'link-33');">insert</a></tt><tt class="py-op">(</tt><tt class="py-number">0</tt><tt class="py-op">,</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">doc</tt><tt class="py-op">.</tt><tt class="py-name">filedir</tt><tt class="py-op">)</tt> </tt>
<a name="L73"></a><tt class="py-lineno"> 73</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">doc</tt><tt class="py-op">.</tt><tt class="py-name">filepath</tt> <tt class="py-keyword">and</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">exists</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">doc</tt><tt class="py-op">.</tt><tt class="py-name">filepath</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L74"></a><tt class="py-lineno"> 74</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">confirmed</tt> <tt class="py-op">=</tt> <tt id="link-34" class="py-name"><a title="Priithon.wxPyPlot.True" class="py-name" href="#" onclick="return doclink('link-34', 'True', 'link-15');">True</a></tt> </tt>
<a name="L75"></a><tt class="py-lineno"> 75</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-35" class="py-name"><a title="Priithon.py.editor
Priithon.usefulX.editor" class="py-name" href="#" onclick="return doclink('link-35', 'editor', 'link-13');">editor</a></tt><tt class="py-op">:</tt> </tt>
<a name="L76"></a><tt class="py-lineno"> 76</tt>  <tt class="py-line">            <tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">doc</tt><tt class="py-op">.</tt><tt id="link-36" class="py-name" targets="Method Priithon.py.document.Document.read()=Priithon.py.document.Document-class.html#read"><a title="Priithon.py.document.Document.read" class="py-name" href="#" onclick="return doclink('link-36', 'read', 'link-36');">read</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L77"></a><tt class="py-lineno"> 77</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-37" class="py-name"><a title="Priithon.py.editor
Priithon.usefulX.editor" class="py-name" href="#" onclick="return doclink('link-37', 'editor', 'link-13');">editor</a></tt><tt class="py-op">.</tt><tt id="link-38" class="py-name" targets="Method Priithon.py.editor.Editor._setBuffer()=Priithon.py.editor.Editor-class.html#_setBuffer"><a title="Priithon.py.editor.Editor._setBuffer" class="py-name" href="#" onclick="return doclink('link-38', '_setBuffer', 'link-38');">_setBuffer</a></tt><tt class="py-op">(</tt><tt id="link-39" class="py-name" targets="Module Priithon.py.buffer=Priithon.py.buffer-module.html"><a title="Priithon.py.buffer" class="py-name" href="#" onclick="return doclink('link-39', 'buffer', 'link-39');">buffer</a></tt><tt class="py-op">=</tt><tt class="py-name">self</tt><tt class="py-op">,</tt> <tt class="py-name">text</tt><tt class="py-op">=</tt><tt class="py-name">text</tt><tt class="py-op">)</tt> </tt>
</div><a name="L78"></a><tt class="py-lineno"> 78</tt>  <tt class="py-line"> </tt>
<a name="Buffer.overwriteConfirm"></a><div id="Buffer.overwriteConfirm-def"><a name="L79"></a><tt class="py-lineno"> 79</tt> <a class="py-toggle" href="#" id="Buffer.overwriteConfirm-toggle" onclick="return toggle('Buffer.overwriteConfirm');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="Priithon.py.buffer.Buffer-class.html#overwriteConfirm">overwriteConfirm</a><tt class="py-op">(</tt><tt class="py-param">filepath</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Buffer.overwriteConfirm-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Buffer.overwriteConfirm-expanded"><a name="L80"></a><tt class="py-lineno"> 80</tt>  <tt class="py-line">        <tt class="py-docstring">"""Confirm overwriting an existing file."""</tt> </tt>
<a name="L81"></a><tt class="py-lineno"> 81</tt>  <tt class="py-line">        <tt class="py-keyword">return</tt> <tt id="link-40" class="py-name"><a title="Priithon.wxPyPlot.False" class="py-name" href="#" onclick="return doclink('link-40', 'False', 'link-26');">False</a></tt> </tt>
</div><a name="L82"></a><tt class="py-lineno"> 82</tt>  <tt class="py-line"> </tt>
<a name="Buffer.save"></a><div id="Buffer.save-def"><a name="L83"></a><tt class="py-lineno"> 83</tt> <a class="py-toggle" href="#" id="Buffer.save-toggle" onclick="return toggle('Buffer.save');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="Priithon.py.buffer.Buffer-class.html#save">save</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Buffer.save-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Buffer.save-expanded"><a name="L84"></a><tt class="py-lineno"> 84</tt>  <tt class="py-line">        <tt class="py-docstring">"""Save buffer."""</tt> </tt>
<a name="L85"></a><tt class="py-lineno"> 85</tt>  <tt class="py-line">        <tt class="py-name">filepath</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">doc</tt><tt class="py-op">.</tt><tt class="py-name">filepath</tt> </tt>
<a name="L86"></a><tt class="py-lineno"> 86</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">filepath</tt><tt class="py-op">:</tt> </tt>
<a name="L87"></a><tt class="py-lineno"> 87</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt>  <tt class="py-comment"># XXX Get filename</tt> </tt>
<a name="L88"></a><tt class="py-lineno"> 88</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">os</tt><tt class="py-op">.</tt><tt class="py-name">path</tt><tt class="py-op">.</tt><tt class="py-name">exists</tt><tt class="py-op">(</tt><tt class="py-name">filepath</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L89"></a><tt class="py-lineno"> 89</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">confirmed</tt> <tt class="py-op">=</tt> <tt id="link-41" class="py-name"><a title="Priithon.wxPyPlot.True" class="py-name" href="#" onclick="return doclink('link-41', 'True', 'link-15');">True</a></tt> </tt>
<a name="L90"></a><tt class="py-lineno"> 90</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">confirmed</tt><tt class="py-op">:</tt> </tt>
<a name="L91"></a><tt class="py-lineno"> 91</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">confirmed</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-42" class="py-name"><a title="Priithon.py.buffer.Buffer.overwriteConfirm" class="py-name" href="#" onclick="return doclink('link-42', 'overwriteConfirm', 'link-27');">overwriteConfirm</a></tt><tt class="py-op">(</tt><tt class="py-name">filepath</tt><tt class="py-op">)</tt> </tt>
<a name="L92"></a><tt class="py-lineno"> 92</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">confirmed</tt><tt class="py-op">:</tt> </tt>
<a name="L93"></a><tt class="py-lineno"> 93</tt>  <tt class="py-line">            <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">doc</tt><tt class="py-op">.</tt><tt id="link-43" class="py-name" targets="Method Priithon.Scientific_IO_TextFile.TextFile.write()=Priithon.Scientific_IO_TextFile.TextFile-class.html#write,Method Priithon.py.document.Document.write()=Priithon.py.document.Document-class.html#write,Method Priithon.py.editwindow.EditWindow.write()=Priithon.py.editwindow.EditWindow-class.html#write,Method Priithon.py.pseudo.PseudoFile.write()=Priithon.py.pseudo.PseudoFile-class.html#write,Method Priithon.py.shell.Shell.write()=Priithon.py.shell.Shell-class.html#write"><a title="Priithon.Scientific_IO_TextFile.TextFile.write
Priithon.py.document.Document.write
Priithon.py.editwindow.EditWindow.write
Priithon.py.pseudo.PseudoFile.write
Priithon.py.shell.Shell.write" class="py-name" href="#" onclick="return doclink('link-43', 'write', 'link-43');">write</a></tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-44" class="py-name"><a title="Priithon.py.editor
Priithon.usefulX.editor" class="py-name" href="#" onclick="return doclink('link-44', 'editor', 'link-13');">editor</a></tt><tt class="py-op">.</tt><tt id="link-45" class="py-name" targets="Method Priithon.py.editor.Editor.getText()=Priithon.py.editor.Editor-class.html#getText"><a title="Priithon.py.editor.Editor.getText" class="py-name" href="#" onclick="return doclink('link-45', 'getText', 'link-45');">getText</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">)</tt> </tt>
<a name="L94"></a><tt class="py-lineno"> 94</tt>  <tt class="py-line">            <tt class="py-keyword">if</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-46" class="py-name"><a title="Priithon.py.editor
Priithon.usefulX.editor" class="py-name" href="#" onclick="return doclink('link-46', 'editor', 'link-13');">editor</a></tt><tt class="py-op">:</tt> </tt>
<a name="L95"></a><tt class="py-lineno"> 95</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-47" class="py-name"><a title="Priithon.py.editor
Priithon.usefulX.editor" class="py-name" href="#" onclick="return doclink('link-47', 'editor', 'link-13');">editor</a></tt><tt class="py-op">.</tt><tt id="link-48" class="py-name" targets="Method Priithon.py.editor.Editor.setSavePoint()=Priithon.py.editor.Editor-class.html#setSavePoint"><a title="Priithon.py.editor.Editor.setSavePoint" class="py-name" href="#" onclick="return doclink('link-48', 'setSavePoint', 'link-48');">setSavePoint</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L96"></a><tt class="py-lineno"> 96</tt>  <tt class="py-line"> </tt>
<a name="Buffer.saveAs"></a><div id="Buffer.saveAs-def"><a name="L97"></a><tt class="py-lineno"> 97</tt> <a class="py-toggle" href="#" id="Buffer.saveAs-toggle" onclick="return toggle('Buffer.saveAs');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="Priithon.py.buffer.Buffer-class.html#saveAs">saveAs</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">,</tt> <tt class="py-param">filename</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Buffer.saveAs-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Buffer.saveAs-expanded"><a name="L98"></a><tt class="py-lineno"> 98</tt>  <tt class="py-line">        <tt class="py-docstring">"""Save buffer."""</tt> </tt>
<a name="L99"></a><tt class="py-lineno"> 99</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">doc</tt> <tt class="py-op">=</tt> <tt id="link-49" class="py-name"><a title="Priithon.py.document" class="py-name" href="#" onclick="return doclink('link-49', 'document', 'link-4');">document</a></tt><tt class="py-op">.</tt><tt id="link-50" class="py-name"><a title="Priithon.py.document.Document" class="py-name" href="#" onclick="return doclink('link-50', 'Document', 'link-30');">Document</a></tt><tt class="py-op">(</tt><tt class="py-name">filename</tt><tt class="py-op">)</tt> </tt>
<a name="L100"></a><tt class="py-lineno">100</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-51" class="py-name"><a title="Priithon.py.crust.Crust.name
Priithon.py.crust.CrustFrame.name
Priithon.py.filling.Filling.name
Priithon.py.filling.FillingFrame.name
Priithon.py.filling.FillingText.name
Priithon.py.filling.FillingTree.name
Priithon.py.shell.Shell.name
Priithon.py.shell.ShellFacade.name
Priithon.py.shell.ShellFrame.name" class="py-name" href="#" onclick="return doclink('link-51', 'name', 'link-12');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">doc</tt><tt class="py-op">.</tt><tt class="py-name">filename</tt> </tt>
<a name="L101"></a><tt class="py-lineno">101</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">modulename</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">doc</tt><tt class="py-op">.</tt><tt class="py-name">filebase</tt> </tt>
<a name="L102"></a><tt class="py-lineno">102</tt>  <tt class="py-line">        <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-52" class="py-name" targets="Function Priithon.Mrc.save()=Priithon.Mrc-module.html#save,Method Priithon.mmviewer.GLViewer.save()=Priithon.mmviewer.GLViewer-class.html#save,Function Priithon.plt.interface.save()=Priithon.plt.interface-module.html#save,Method Priithon.plt.wxplt.plot_canvas.save()=Priithon.plt.wxplt.plot_canvas-class.html#save,Method Priithon.py.buffer.Buffer.save()=Priithon.py.buffer.Buffer-class.html#save"><a title="Priithon.Mrc.save
Priithon.mmviewer.GLViewer.save
Priithon.plt.interface.save
Priithon.plt.wxplt.plot_canvas.save
Priithon.py.buffer.Buffer.save" class="py-name" href="#" onclick="return doclink('link-52', 'save', 'link-52');">save</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
</div><a name="L103"></a><tt class="py-lineno">103</tt>  <tt class="py-line"> </tt>
<a name="Buffer.updateNamespace"></a><div id="Buffer.updateNamespace-def"><a name="L104"></a><tt class="py-lineno">104</tt> <a class="py-toggle" href="#" id="Buffer.updateNamespace-toggle" onclick="return toggle('Buffer.updateNamespace');">-</a><tt class="py-line">    <tt class="py-keyword">def</tt> <a class="py-def-name" href="Priithon.py.buffer.Buffer-class.html#updateNamespace">updateNamespace</a><tt class="py-op">(</tt><tt class="py-param">self</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
</div><div id="Buffer.updateNamespace-collapsed" style="display:none;" pad="+++" indent="++++++++"></div><div id="Buffer.updateNamespace-expanded"><a name="L105"></a><tt class="py-lineno">105</tt>  <tt class="py-line">        <tt class="py-docstring">"""Update the namespace for autocompletion and calltips.</tt> </tt>
<a name="L106"></a><tt class="py-lineno">106</tt>  <tt class="py-line"><tt class="py-docstring"></tt> </tt>
<a name="L107"></a><tt class="py-lineno">107</tt>  <tt class="py-line"><tt class="py-docstring">        Return True if updated, False if there was an error."""</tt> </tt>
<a name="L108"></a><tt class="py-lineno">108</tt>  <tt class="py-line">        <tt class="py-keyword">if</tt> <tt class="py-keyword">not</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">interp</tt> <tt class="py-keyword">or</tt> <tt class="py-keyword">not</tt> <tt class="py-name">hasattr</tt><tt class="py-op">(</tt><tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-53" class="py-name"><a title="Priithon.py.editor
Priithon.usefulX.editor" class="py-name" href="#" onclick="return doclink('link-53', 'editor', 'link-13');">editor</a></tt><tt class="py-op">,</tt> <tt class="py-string">'getText'</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L109"></a><tt class="py-lineno">109</tt>  <tt class="py-line">            <tt class="py-keyword">return</tt> <tt id="link-54" class="py-name"><a title="Priithon.wxPyPlot.False" class="py-name" href="#" onclick="return doclink('link-54', 'False', 'link-26');">False</a></tt> </tt>
<a name="L110"></a><tt class="py-lineno">110</tt>  <tt class="py-line">        <tt class="py-name">syspath</tt> <tt class="py-op">=</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">path</tt> </tt>
<a name="L111"></a><tt class="py-lineno">111</tt>  <tt class="py-line">        <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">syspath</tt> </tt>
<a name="L112"></a><tt class="py-lineno">112</tt>  <tt class="py-line">        <tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-55" class="py-name"><a title="Priithon.py.editor
Priithon.usefulX.editor" class="py-name" href="#" onclick="return doclink('link-55', 'editor', 'link-13');">editor</a></tt><tt class="py-op">.</tt><tt id="link-56" class="py-name"><a title="Priithon.py.editor.Editor.getText" class="py-name" href="#" onclick="return doclink('link-56', 'getText', 'link-45');">getText</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L113"></a><tt class="py-lineno">113</tt>  <tt class="py-line">        <tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt class="py-name">text</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\r\n'</tt><tt class="py-op">,</tt> <tt class="py-string">'\n'</tt><tt class="py-op">)</tt> </tt>
<a name="L114"></a><tt class="py-lineno">114</tt>  <tt class="py-line">        <tt class="py-name">text</tt> <tt class="py-op">=</tt> <tt class="py-name">text</tt><tt class="py-op">.</tt><tt class="py-name">replace</tt><tt class="py-op">(</tt><tt class="py-string">'\r'</tt><tt class="py-op">,</tt> <tt class="py-string">'\n'</tt><tt class="py-op">)</tt> </tt>
<a name="L115"></a><tt class="py-lineno">115</tt>  <tt class="py-line">        <tt id="link-57" class="py-name"><a title="Priithon.py.crust.Crust.name
Priithon.py.crust.CrustFrame.name
Priithon.py.filling.Filling.name
Priithon.py.filling.FillingFrame.name
Priithon.py.filling.FillingText.name
Priithon.py.filling.FillingTree.name
Priithon.py.shell.Shell.name
Priithon.py.shell.ShellFacade.name
Priithon.py.shell.ShellFrame.name" class="py-name" href="#" onclick="return doclink('link-57', 'name', 'link-12');">name</a></tt> <tt class="py-op">=</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">modulename</tt> <tt class="py-keyword">or</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt id="link-58" class="py-name"><a title="Priithon.py.crust.Crust.name
Priithon.py.crust.CrustFrame.name
Priithon.py.filling.Filling.name
Priithon.py.filling.FillingFrame.name
Priithon.py.filling.FillingText.name
Priithon.py.filling.FillingTree.name
Priithon.py.shell.Shell.name
Priithon.py.shell.ShellFacade.name
Priithon.py.shell.ShellFrame.name" class="py-name" href="#" onclick="return doclink('link-58', 'name', 'link-12');">name</a></tt> </tt>
<a name="L116"></a><tt class="py-lineno">116</tt>  <tt class="py-line">        <tt class="py-name">module</tt> <tt class="py-op">=</tt> <tt class="py-name">imp</tt><tt class="py-op">.</tt><tt class="py-name">new_module</tt><tt class="py-op">(</tt><tt id="link-59" class="py-name"><a title="Priithon.py.crust.Crust.name
Priithon.py.crust.CrustFrame.name
Priithon.py.filling.Filling.name
Priithon.py.filling.FillingFrame.name
Priithon.py.filling.FillingText.name
Priithon.py.filling.FillingTree.name
Priithon.py.shell.Shell.name
Priithon.py.shell.ShellFacade.name
Priithon.py.shell.ShellFrame.name" class="py-name" href="#" onclick="return doclink('link-59', 'name', 'link-12');">name</a></tt><tt class="py-op">)</tt> </tt>
<a name="L117"></a><tt class="py-lineno">117</tt>  <tt class="py-line">        <tt class="py-name">newspace</tt> <tt class="py-op">=</tt> <tt class="py-name">module</tt><tt class="py-op">.</tt><tt class="py-name">__dict__</tt><tt class="py-op">.</tt><tt class="py-name">copy</tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L118"></a><tt class="py-lineno">118</tt>  <tt class="py-line">        <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L119"></a><tt class="py-lineno">119</tt>  <tt class="py-line">            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L120"></a><tt class="py-lineno">120</tt>  <tt class="py-line">                <tt class="py-name">code</tt> <tt class="py-op">=</tt> <tt class="py-name">compile</tt><tt class="py-op">(</tt><tt class="py-name">text</tt><tt class="py-op">,</tt> <tt id="link-60" class="py-name"><a title="Priithon.py.crust.Crust.name
Priithon.py.crust.CrustFrame.name
Priithon.py.filling.Filling.name
Priithon.py.filling.FillingFrame.name
Priithon.py.filling.FillingText.name
Priithon.py.filling.FillingTree.name
Priithon.py.shell.Shell.name
Priithon.py.shell.ShellFacade.name
Priithon.py.shell.ShellFrame.name" class="py-name" href="#" onclick="return doclink('link-60', 'name', 'link-12');">name</a></tt><tt class="py-op">,</tt> <tt class="py-string">'exec'</tt><tt class="py-op">)</tt> </tt>
<a name="L121"></a><tt class="py-lineno">121</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L122"></a><tt class="py-lineno">122</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> </tt>
<a name="L123"></a><tt class="py-lineno">123</tt>  <tt class="py-line"><tt class="py-comment">#                return False</tt> </tt>
<a name="L124"></a><tt class="py-lineno">124</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">try</tt><tt class="py-op">:</tt> </tt>
<a name="L125"></a><tt class="py-lineno">125</tt>  <tt class="py-line">                <tt class="py-keyword">exec</tt> <tt class="py-name">code</tt> <tt class="py-keyword">in</tt> <tt class="py-name">newspace</tt> </tt>
<a name="L126"></a><tt class="py-lineno">126</tt>  <tt class="py-line">            <tt class="py-keyword">except</tt><tt class="py-op">:</tt> </tt>
<a name="L127"></a><tt class="py-lineno">127</tt>  <tt class="py-line">                <tt class="py-keyword">raise</tt> </tt>
<a name="L128"></a><tt class="py-lineno">128</tt>  <tt class="py-line"><tt class="py-comment">#                return False</tt> </tt>
<a name="L129"></a><tt class="py-lineno">129</tt>  <tt class="py-line"><tt class="py-comment"></tt>            <tt class="py-keyword">else</tt><tt class="py-op">:</tt> </tt>
<a name="L130"></a><tt class="py-lineno">130</tt>  <tt class="py-line">                <tt class="py-comment"># No problems, so update the namespace.</tt> </tt>
<a name="L131"></a><tt class="py-lineno">131</tt>  <tt class="py-line"><tt class="py-comment"></tt>                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">interp</tt><tt class="py-op">.</tt><tt class="py-name">locals</tt><tt class="py-op">.</tt><tt id="link-61" class="py-name" targets="Method Priithon.py.shell.Shell.clear()=Priithon.py.shell.Shell-class.html#clear"><a title="Priithon.py.shell.Shell.clear" class="py-name" href="#" onclick="return doclink('link-61', 'clear', 'link-61');">clear</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt> </tt>
<a name="L132"></a><tt class="py-lineno">132</tt>  <tt class="py-line">                <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">interp</tt><tt class="py-op">.</tt><tt class="py-name">locals</tt><tt class="py-op">.</tt><tt id="link-62" class="py-name" targets="Method Priithon.plt.wxplt.plot_canvas.update()=Priithon.plt.wxplt.plot_canvas-class.html#update,Method Priithon.plt.wxplt.plot_frame.update()=Priithon.plt.wxplt.plot_frame-class.html#update"><a title="Priithon.plt.wxplt.plot_canvas.update
Priithon.plt.wxplt.plot_frame.update" class="py-name" href="#" onclick="return doclink('link-62', 'update', 'link-62');">update</a></tt><tt class="py-op">(</tt><tt class="py-name">newspace</tt><tt class="py-op">)</tt> </tt>
<a name="L133"></a><tt class="py-lineno">133</tt>  <tt class="py-line">                <tt class="py-keyword">return</tt> <tt id="link-63" class="py-name"><a title="Priithon.wxPyPlot.True" class="py-name" href="#" onclick="return doclink('link-63', 'True', 'link-15');">True</a></tt> </tt>
<a name="L134"></a><tt class="py-lineno">134</tt>  <tt class="py-line">        <tt class="py-keyword">finally</tt><tt class="py-op">:</tt> </tt>
<a name="L135"></a><tt class="py-lineno">135</tt>  <tt class="py-line">            <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">path</tt> <tt class="py-op">=</tt> <tt class="py-name">syspath</tt> </tt>
<a name="L136"></a><tt class="py-lineno">136</tt>  <tt class="py-line">            <tt class="py-keyword">for</tt> <tt class="py-name">m</tt> <tt class="py-keyword">in</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">modules</tt><tt class="py-op">.</tt><tt id="link-64" class="py-name"><a title="Priithon.plt.dumbdbm_patched._Database.keys" class="py-name" href="#" onclick="return doclink('link-64', 'keys', 'link-14');">keys</a></tt><tt class="py-op">(</tt><tt class="py-op">)</tt><tt class="py-op">:</tt> </tt>
<a name="L137"></a><tt class="py-lineno">137</tt>  <tt class="py-line">                <tt class="py-keyword">if</tt> <tt class="py-name">m</tt> <tt class="py-keyword">not</tt> <tt class="py-keyword">in</tt> <tt class="py-name">self</tt><tt class="py-op">.</tt><tt class="py-name">modules</tt><tt class="py-op">:</tt> </tt>
<a name="L138"></a><tt class="py-lineno">138</tt>  <tt class="py-line">                    <tt class="py-keyword">del</tt> <tt class="py-name">sys</tt><tt class="py-op">.</tt><tt class="py-name">modules</tt><tt class="py-op">[</tt><tt class="py-name">m</tt><tt class="py-op">]</tt> </tt>
</div></div><a name="L139"></a><tt class="py-lineno">139</tt>  <tt class="py-line"> </tt><script type="text/javascript">
<!--
expandto(location.href);
// -->
</script>
</pre>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="Priithon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/priithon">Priithon</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Mon Nov 22 14:59:48 2010
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
